<?php
//error_reporting(E_ALL);
include "../../include/common.inc.php";
header("Content-type: text/html; charset=utf-8");
session_start();
include "../adminyz.php";

	include WEB_CLASS.'mycrm_class.php';
	$rolesys =new Mycrm('rolesys');
	$rolesys_list=$rolesys->GetList(array('id','rolename'),0,100,'groupid='.$groupid);
	$json_ar = array();
	foreach($rolesys_list as $key=>$value){
		$json_ar[$value['id']] = ANY2UTF($value['rolename']);
	}
echo json_encode($json_ar);

function ANY2UTF($str)
{
	// mb_detect_encoding($str, 'UTF-8, GBK, GB2312, ISO-8859-1', true)
	$str = @mb_convert_encoding($str, 'UTF-8', 'gb2312');
	return $str;
}
?>